home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_jsbrowser.js < prev    next >
Encoding:
JavaScript  |  1998-09-16  |  1.7 KB  |  85 lines

  1. // BUGBUG - This file is obsolete.
  2.  
  3. var SLASH = "/"
  4. var DBLSLASH = "\\"
  5.  
  6. //open
  7. var POP = true;
  8.  
  9. //browser style
  10. var TDIR = 0
  11. var TFILE = 1
  12.  
  13. //system font size
  14. var SMALL = 0
  15. var LARGE = 1
  16.  
  17. function BrowserObj(pathCntrl,open,browsertype,sysfontsize)
  18.     {    
  19.         this.browsertype = browsertype;
  20.         this.sysfontsize = sysfontsize;
  21.         this.currentFile = "";
  22.                         
  23.         if (pathCntrl != null)
  24.             {
  25.             this.currentPath = pathCntrl.value;
  26.             this.lastpath = pathCntrl.value;
  27.             this.pathCntrl = pathCntrl;
  28.             }
  29.         else
  30.             {
  31.             this.currentPath = "";
  32.             this.lastPath = "";
  33.             }
  34.             
  35.         
  36.         this.BrowserObjSetPath = BrowserObjSetPath;    
  37.         this.BrowserObjOpen = BrowserObjOpen;
  38.         
  39.         if (open)
  40.             {
  41.             BrowserObjOpen();
  42.             }    
  43.     }
  44.  
  45. function BrowserObjPop(title, width, height, filename)
  46.     {
  47.  
  48.         thefile=(filename + ".asp");
  49.         thefile="JSBrowser/JSBrwPop.asp?pg="+thefile+"&jsfontsize="+JSBrowser.sysfontsize;
  50.         var browser = navigator.appName;
  51.         popbox=window.open(thefile,title,"resizable=yes,toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  52.         popbox.opener = self;
  53.         
  54.     }
  55.     
  56. function BrowserObjOpen()
  57.     {
  58.         BrowserObjPop('Browser',525,300,'JSBrowser');
  59.     }
  60.  
  61. function BrowserObjSetPath()
  62.     {    
  63.         if (JSBrowser.browsertype == TDIR)
  64.             {
  65.             JSBrowser.pathCntrl.value = JSBrowser.currentPath;         
  66.             }
  67.         else
  68.             {
  69.             currentPath = JSBrowser.currentPath;
  70.  
  71.             if (currentPath.lastIndexOf(DBLSLASH) == currentPath.length-1)
  72.                 {
  73.                     JSBrowser.pathCntrl.value = currentPath + JSBrowser.currentFile;
  74.                 }
  75.             else
  76.                 {
  77.                     JSBrowser.pathCntrl.value = currentPath + DBLSLASH + JSBrowser.currentFile;                
  78.                 }
  79.             }
  80.         JSBrowser.pathCntrl.focus();
  81.         JSBrowser.pathCntrl.blur();        
  82.     }    
  83.     
  84.  
  85.